package reflect;

/**
 *
 * reflect
 * javaBean的名称
 *
 * 用于测试反射
 * 2018/5/7-20:59
 * 2018
 * Created by wuqiang on 2018/5/7.
 */
public class Person implements Activity {
    public String name;
    private int age;

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public Person() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public static void main(String[] args) {
        System.out.println("我是Main方法，快来调用我吧");
    }

    @Override
    public void eat(String food) throws Exception {
        System.out.println("我吃"+food);
    }

    /**
     * 跑的方法
     * @param leng 跑了多少公里
     */
    @Override
    public void run(Double leng) {
        System.out.println("我跑"+leng);
    }
}
